package com.mtons.mblog.web.controller.site;

import com.alibaba.fastjson.JSONObject;
import com.mtons.mblog.modules.data.CommentVO;
import com.mtons.mblog.modules.service.CommentService;
import com.mtons.mblog.modules.service.MusicService;
import com.mtons.mblog.web.controller.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * 留言板.
 * @author yuzhong
 * @date 2019/2/25 18:50
 */
@Controller
public class LeaveController extends BaseController {
    @Autowired
    private CommentService commentService;

    @RequestMapping("/leave")
    public String leave(ModelMap model) {
        String tags = "leave";
        List<CommentVO> leaveVOList = commentService.findByKey(tags);
        model.put("leaves", leaveVOList);
        return view(Views.LEAVE);
    }
}
